import Vue from 'vue'
import Router from 'vue-router'
// 引入入口文件 Pos
import Pos from '@/components/page/Pos'
import commodity from '@/components/page/commodity'
import member from '@/components/page/member'
import statistics from '@/components/page/statistics'
import store from '@/components/page/store'
import main from '@/components/page/main'
// 引入左边栏
import leftNav from '@/components/common/leftNav'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: main,
      children:[
        //首页页面组件 ShoppingMall
        { path: '/',name: 'Pos',component: Pos }, 
        { path:'/commodity', name: 'commodity', component: commodity },
        { path:'/member', name: 'member', component: member },
        { path:'/statistics', name: 'statistics', component: statistics },
        { path:'/store', name: 'store', component: store },
      ]
    },
    { path:'/leftNav',name: 'leftNav',component: leftNav },
  ]
})
